﻿<%@ Page Title="Ultimate Vacation Experience CMS :: Contracts" Language="C#" MasterPageFile="~/Agent/Agent.Master" AutoEventWireup="true" CodeBehind="ContactManagementContracts.aspx.cs" Inherits="TravelSite.Agent.ContactManagementContracts" %>
<%@ Register TagName="ContractDetails" Src="~/Controls/ContractDetails.ascx" TagPrefix="travel"  %>
<%@ Register TagName="ContactDetails" Src="~/Controls/ContactDetails.ascx" TagPrefix="travel"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        $(function () {
            <%=this.JsCodeToRunOnReady%>;
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
            <div class="page_header">
                <h2><img src="<%=ResolveClientUrl("~") %>images/design/contract_tt_icon.png" alt="" title="" /> <asp:Label runat="server" ID="lblTitle1"/><asp:HyperLink runat="server" ID="hlContactTitle" href="javascript:void(0)"></asp:HyperLink><asp:Label runat="server" ID="lblTitle2"/></h2>
            </div>
            
            <asp:UpdatePanel ID="upMain" runat="server" UpdateMode="Conditional">
            <ContentTemplate>

        	<div class="page_container">
                <div class="table-responsive">
                <asp:GridView ID="grid" AutoGenerateColumns="false" runat="server" CssClass="table table-bordered table-hover"
                AllowPaging="False" PageSize="20"
                onrowdatabound="grid_RowDataBound" OnRowCommand="grid_Command">
                <PagerSettings Mode="Numeric" PageButtonCount="4" NextPageText=">" PreviousPageText="<"  FirstPageText="<<" LastPageText=">>"/>
                <Columns>
                    <asp:TemplateField HeaderText="Contracts Date">
                        <ItemTemplate>
                            <asp:HiddenField ID="hidId" Value='<%#Eval("ContractId")%>' runat="server" />
                            <asp:Label ID="lblContractDate" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Client Name">
                        <ItemTemplate>
                            <asp:Label ID="lblContactName" Text='<%# Eval("ContactName") %>' runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Status">
                        <ItemTemplate>
                            <asp:Label ID="lblStatus" Text='<%# Eval("Status") %>' runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Signature" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:Label ID="lblSignature" Text='<%# Eval("Signature") %>' runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Action">
                        <ItemTemplate>
                            <a href='javascript:void(0)' runat="server" id="lnkEdit">
                                <img src="<%=ResolveClientUrl("~") %>images/design/actions_icon/edit_icon.png" alt="" title="Edit" border="0" />
                            </a>
                            <asp:ImageButton runat="server" ImageUrl="~/images/design/actions_icon/delete_icon.gif" ToolTip="Delete" Style="vertical-align:middle;"
                                ID="lbtnDelete" OnCommand="grid_Command" CommandName="delete" CommandArgument='<%# Eval("ContractId")%>' OnClientClick="return confirm('Please confirm if you want to delete contract')" />
                            <a target="_blank" runat="server" id="lnkPdf">
                                <img src="<%=ResolveClientUrl("~") %>images/design/actions_icon/pdf_icon.png" alt="" title="Pdf" border="0" />
                            </a>
                            <asp:ImageButton runat="server" ImageUrl="~/images/design/actions_icon/message_replay_icon.png" ToolTip="Resend" Style="vertical-align:middle;"
                                ID="btnResend" OnCommand="grid_Command" CommandName="resend" CommandArgument='<%# Eval("ContractId")%>' OnClientClick="return confirm('Please confirm if you want to resend link')" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                </asp:GridView>
                </div>

                <div class="button_group">
                    <asp:Button CssClass="btn btn-warning" ID="btnAdd" Text="Create New Contract" runat="server" OnClientClick="createContractForm(-1); return false;" />
                </div> 
            </div>

            </ContentTemplate>
                <Triggers>
                </Triggers>
            </asp:UpdatePanel>

            <travel:ContractDetails ID="ctrlDetails"  runat="server" />
            <travel:ContactDetails ID="ctrlContact"  runat="server" />
</asp:Content>